package com.riguz.forks.framework.mvc.view;

import java.util.HashMap;
import java.util.Map;

import com.riguz.forks.framework.mvc.Result;

public class View extends Result {
    private static final long serialVersionUID = 3141042849245711550L;
    String                    path;
    Map<String, Object>       parameters       = new HashMap<>();
    
    public View(String path){
        this.path = path;
    }
    
    public View(String path, Map<String, Object> parameters) {
        this.path = path;
        this.parameters = parameters;
    }

    public String getPath() {
        return path;
    }

    public View setPath(String path) {
        this.path = path;
        return this;
    }

    public Map<String, Object> getParameters() {
        return parameters;
    }

    public View setParameters(Map<String, Object> parameters) {
        this.parameters = parameters;
        return this;
    }
    
    public View set(String key, Object data){
        this.parameters.put(key, data);
        return this;
    }
}
